package cn.changein.framework.config;

import cn.changein.framework.exception.DefaultExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * <p>
 *     保留类，如果控制器需要些aop在这里写
 * </p>
 *

 * @Date: 2020-10-27 15:04
 * @Copyright: companyName
 * @Version 1.0
 * @Since JDK1.8
 */
@Configuration
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class AopAutoConfiguration {

    /**
     * 默认的异常拦截器
     */
    @Bean
    public DefaultExceptionHandler defaultControllerExceptionHandler() {
        return new DefaultExceptionHandler();
    }

}
